<template>
  <div class="">
    <div>
      <div class="special_top">
        <p class="router-link-active">
          <i class="van-icon van-icon-arrow-left" @click="adds"></i>
        </p>
        <p>严选专栏</p>
        <p></p>
      </div>
      <ul id="special_content">
        <li v-for="item in pi" :key="item.id">
          <img :src="item.pic" alt="" />
          <p>{{ item.title }}</p>
          <p class="pl">{{ item.descript }}</p>
          <p @click="change(item)">查看详情</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { getbanner, getlist, getfen } from "@/utils/api/home.js";

export default {
  data() {
    return {
      pi: [],
    };
  },
  mounted() {
    getlist().then((res) => {
      console.log(res);
      this.pi = res.data;
    });
  },
  methods: {
    adds() {
      this.$router.go(-1);
    },
    change(item) {
      this.$router.push({ path: "/xiang", query: { obj: item } });
    },
  },
};
</script>

<style lang='scss'>
.special_top {
  width: 100%;
  height: 0.7rem;
  background: #ffffff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 0 0.15rem;
  position: fixed;
  left: 0;
  top: 10;
  z-index: 100;
}
.special_top > p:nth-of-type(1) {
  font-size: 0.3rem;
}
.van-icon {
  position: relative;
  display: inline-block;
  font: normal normal normal 14px/1 vant-icon;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
.special_top > p:nth-of-type(2) {
  font-size: 0.34rem;
}
#special_content {
  padding-top: 0.7rem;
  padding-bottom: 0.2rem;
  > li {
    padding-left: 0.09rem;
    padding-top: 0.09rem;
    padding-right: 0.09rem;
    text-align: center;
    position: relative;
  }
}
#special_content li img {
  width: 7.3rem;
  height: 3.66rem;
  display: block;
  background: rgba(0, 0, 0, 0.7);
}
#special_content li p:nth-of-type(1) {
  position: absolute;
  top: 0.8rem;
  left: 10%;
  width: 80%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.31rem;
  color: white;
}
#special_content li p:nth-of-type(2) {
  position: absolute;
  top: 1.4rem;
  left: 10%;
  width: 80%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.31rem;
  color: white;
}
#special_content li p:nth-of-type(3) {
  position: absolute;
  top: 2.5rem;
  left: 3.1rem;
  width: 1.5rem;
  height: 0.5rem;
  text-align: center;
  line-height: 0.5rem;
  font-size: 0.18rem;
  color: white;
  border: 0.01rem solid #ffffff;
  border-radius: 0.5rem;
}
</style>
